import React, { Component, Suspense } from 'react'
import { HashRouter as Router, Route, Redirect } from 'react-router-dom'

import Home from './pages/Home'

export default class App extends Component {
  render() {
    return (
      <Router>
        <Suspense fallback={<div className="router-loadin">Loading...</div>}>
          <div className="App">
            <Route path="/" exact render={() => <Redirect to="/home" />} />
            <Route path="/home" component={Home} />
          </div>
        </Suspense>
      </Router>
    )
  }
}
